package sctu.edu.java.year2016.team02.project.pc.loginMan;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * Created by Eoly on 2016/6/10.
 */
public class Operator {
    private String ipAddress;
    private String name;
    public boolean isAD;//判断是否为管理员

    public Operator(){
        try {
            //获得ip地址
            InetAddress ip = InetAddress.getLocalHost();
            ipAddress=ip.getHostAddress();
            name=ip.getHostName();
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }

    }

    public String getIpAddress() {
        return ipAddress;
    }

    public String getName() {
        return name;
    }
}
